<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<script type="text/javascript">
    function deleteBanco() {
        return confirm("Desea eliminar este banco");
    }
</script>
<div class="container">
   <div class="row"><br><br>
    <h2>Listado de Bancos</h2>
    <h6>Criterios de Busqueda</h6>    
    <div class="hero-unit-min">
    <div class="buscar-form">
        <form:form action="buscar" method="post" commandName="criterioBusqueda">
        <table border=0 cellspacing=0 cellpadding=0 width="100%" height="50px" bordercolor=red >
            <tr>
                <td>Banco</td>
                <td>
                    <form:input path="nombre" size="10"></form:input>
                </td>
                             
                <!--td>
                    <input type="submit" value="Buscar" class="btn btn-mini btn-primary"/>
                </td-->
            </tr>
            <tr>
                <td colspan="6" align="right">
                    <input type="submit" value="Buscar" class="btn btn-mini btn-primary"/>
                    <a href="<c:url value='/pages/banco/new'/>" class="btn btn-mini btn-primary">Nuevo</a>
                </td>
            </tr>            
        </table>
        </form:form>
     </div>
    </div>    
    <table class="table table-striped">
        <tr>
            <th>#</th>
            <th>Banco</th>
            <th>Estado</th>
            <th style="width: 150px;"></th>
            <th style="width: 150px;"></th>
        </tr>
        <c:forEach var="banco" items="${resultado}">
            <tr>
                <td>${banco.idbanco}</td>
                <td>${banco.nobanco}</td>
                <td>Activo</td>
                <td><a title="editar" href="<c:url value='/pages/banco/edit?id=${banco.idbanco}'/>"><i class="icon-edit"></i></a></td>
                <td><a title="eliminar" href="<c:url value='/pages/banco/delete?id=${banco.idbanco}'/>" onclick="return deleteBanco();"><i class="icon-delete"></i></a></td>
            </tr>
        </c:forEach>
    </table>
</div>
